#ifndef XDIVA_ENTRYITEM_H
#define XDIVA_ENTRYITEM_H

#include "PanelTreeItem.h"

#define PLUSICON "images/plus.png"
#define MINUSICON "images/minus.png"

class AbstractManager;
class VariablePanel;
class UnfoldButton;
class xMappingNode;
class WOP_Entry;
class EntryFrameItem;
class GraphicsButton;

class EntryItem
	:public PanelTreeItem
{
	Q_OBJECT
public:

	EntryItem(std::string, std::string, xMappingNode*, WOP_Entry*, AbstractManager*,VariablePanel*,EntryFrameItem* =0);
	~EntryItem(void);
	WOP_Entry* getWOPEntry();
	void removeAllLinks();
	void remove();

signals:
	void contextMenuRequired( EntryItem * item );

protected:
	virtual void drawType( QPainter * painter );
	virtual void contextMenuEvent( QGraphicsSceneContextMenuEvent * event );

private:
	int _typeRectWidth;
	WOP_Entry* _wopEntry;
	
	void setupPort();
	void unfold(bool);
	
};

#endif
